package com.rtech.app.model;

import java.util.List;
import java.util.ArrayList;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * Director class representing dir and sub-dir on system.
 * 
 * @author ruchi
 * 
 */
@XmlRootElement(name = "directory")
public class Directory implements Node {

	private String dirName;
	private boolean isExist;
	private List<File> files;
	private List<Directory> dirs;

	public Directory() {
		files = new ArrayList<File>();
		dirs = new ArrayList<Directory>();
	}

	public boolean isExist() {
		return isExist;
	}

	public void setExist(boolean isExist) {
		this.isExist = isExist;
	}

	public String getDirName() {
		return dirName;
	}

	public void setDirName(String dirName) {
		this.dirName = dirName;
	}

	// @XmlElement(name="test-data")

	@XmlElement(name = "files")
	public List<File> getFiles() {
		return files;
	}

	public void setFiles(List<File> files) {
		this.files = files;
	}

	@XmlElement(name = "subdirs")
	public List<Directory> getDirs() {
		return dirs;
	}

	public void setDirs(List<Directory> dirs) {
		this.dirs = dirs;
	}
}
